#ifndef QFITSPLUGININTERFACE_H
#define QFITSPLUGININTERFACE_H
#include <QString>
#include <QObject>

/**
 * Fully virtual class (interface) to be subclassed (implemented)
 * by all plugins if the QFits program.
 * Plugins must also inherit QWidget if they want to be visible otherwise
 * they must just inherit QObject.
 * Plugins can connect with the parent signals if they want to
 * react to events.
 */
class QFitsPlugin{
public:
	//virtual ~QFitsPlugin() = 0;
	/**
	 * Called when a parent is assigned to the plugin.
	 * Use this to connect to the wanted signals of the plugin manager.
	 * @param manager Pluginmanager that has the following signals:
	 *   grayChanged ( double midValue, double grayScale );
	 *   colormapChanged ( QVector<QColor> colorMap );
	 *   fitsChanged ( FITS *fits );
	 * These signals all work in two directions. Be aware that if you
	 * listen to a signal you will also receive it after sending it.
	 */
	virtual void onInitialize( QObject *manager = 0 ) = 0;
 };

Q_DECLARE_INTERFACE(QFitsPlugin, "nl.ru.astro.Plugin.QFitsPlugin/1.0");

#endif // QFITSPLUGININTERFACE_H
